package ru.urfc.portal.model.radio;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import ru.urfc.portal.model.SpectrObject;
import ru.urfc.portal.ui.client.Constants;

@Table(name = "portal_measureresults")
@Entity
@XmlRootElement(name = Constants.RECORD)
public class DeviceMeasurement extends SpectrObject {

	private DeviceWithExtra device; 
	public String number;
	@Temporal(TemporalType.DATE)
	public Date issueDate;
	
	public DeviceMeasurement() {
	}
	
	public DeviceMeasurement(DeviceWithExtra device, String number, Date issueDate) {
		this.device = device; 
		this.number = number;
		this.issueDate = issueDate;
	}
	
	@XmlTransient
	public DeviceWithExtra getDevice() {
		return device;
	}

}
